<template>
  <div class="rightItem">
    <el-dropdown>
      <el-button type="primary" :icon="User" />
      <template #dropdown>
        <el-dropdown-item @click="router.push(profileUrl)">个人中心</el-dropdown-item>
        <el-dropdown-item v-if="recordUrl != null" @click="router.push(recordUrl)">消费记录</el-dropdown-item>
<!--        <el-dropdown-item @click="chatDraw=true">消息</el-dropdown-item>-->
      </template>
    </el-dropdown>
<!--    <el-drawer :z-index="1000" v-model="chatDraw" size="90%" title="聊天框">-->
<!--      <chat></chat>-->
<!--    </el-drawer>-->
  </div>
</template>
<script setup>
import { User } from '@element-plus/icons-vue'
import router from "~/config/router.js"
defineProps({
  profileUrl: String,
  chatUrl: String,
  recordUrl: { type: String, default: "" }
})

</script>
<style scoped>
.rightItem {
  position: fixed;
  float: right;
  z-index: 100;
  top: 20px;
  right: 40px;
}
</style>